package contacts.po;

/**
 * Room的pojo类
 * @author 梁宇ling
 *
 */
public class Room implements  Comparable<Object>{
	private int roomNo;
	private String roomName;
	
	public Room() {
		super();
	}
	
	public Room(int roomNo, String roomName) {
		super();
		this.roomNo = roomNo;
		this.roomName = roomName;
	}

	public int getRoomNo() {
		return roomNo;
	}
	public void setRoomNo(int roomNo) {
		this.roomNo = roomNo;
	}
	public String getRoomName() {
		return roomName;
	}
	public void setRoomName(String roomName) {
		this.roomName = roomName;
	}

	@Override
	public String toString() {
		return "Room [roomNo=" + roomNo 
				+ ", roomName=" + roomName + "]";
	}

	@Override
	public int compareTo(Object object) {
		Room room= (Room) object;
		int difference = (int) ((this.getRoomNo()- room.getRoomNo()) * 10000);
		return difference;
	}
}
